
import request from '../utils/request';

/**
 * 获取地址列表数据
 */
export const getAddressListApi = () => {
  return request('/mall-api/userAddress/findUserAddress');
}

/**
 * 获取订单地址数据
 */
export const getOrderAddressApi = () => {
  return request('/mall-api/userAddress/getOrderAddress');
}

/**
 * 添加地址数据
 */
export const addAddressApi = (data) => {
  return request('/mall-api/userAddress/save', data, 'POST');
}

/**
 * 修改地址数据
 */
export const updateAddressApi = (data) => {
  return request('/mall-api/userAddress/update', data, 'POST');
}

/**
 * 删除地址数据
 */
export const delAddressApi = (id) => {
  return request(`/mall-api/userAddress/delete/${id}`);
}